package com.atguigu06._final;

/**
 * ClassName: PersonTest
 * Description:
 *
 * @Author liu
 * @Create 2024/11/8 22:56
 * @Version 1.0
 */
public class FinalTest {
    public static void main(String[] args) {
        E e = new E();
        System.out.println(e.MIN_SCORE);
        //e.MIN_SCORE =12;

        E e1 = new E(2);
        System.out.println(e1.LEFT);

    }

}

class A{

}

class C{
    public final void method(){

    }
}

class D extends C{
    //方法没法重写
//    public void method(){
//
//    }
}

class E{
    //成员变量
    final int MIN_SCORE =0;
    final int MAX_SCORE;

    //代码块
    {
        MAX_SCORE = 100;
    }
    final int LEFT;

    //构造器
    public E(){
        LEFT =2;
    }
    public E(int left){
        LEFT =left;
    }

}

class F{
    public void method(){
        final  int num;
        num = 10;
        System.out.println(num);
    }
    public void method(final int num){
//        num++;
        System.out.println(num);
    }
}